﻿//-----------------------------------------------------------------------
// <copyright file="SwaggerConfigure.cs" company="SLWY Enterprises">
// * Copyright (C) 2017 四川商旅无忧科技有限公司 版权所有。
// * version : 1.0
// * author  : qinchaoyue
// * FileName: SwaggerConfigure.cs
// * history : created by qinchaoyue 2017-10-24 11:16:01
// </copyright>
//-----------------------------------------------------------------------

using Microsoft.AspNetCore.Builder;

namespace Slwy.FrameCore.Swagger
{
    /// <summary>
    /// swagger 配置
    /// </summary>
    public static class SwaggerConfigure
    {
        /// <summary>
        /// 配置 swagger
        /// </summary>
        /// <param name="app">the app. </param>
        public static void AddSwaggerConfigure(this IApplicationBuilder app)
        {
            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "Slwy API v1");
                c.ShowRequestHeaders();
            });
        }
    }
}
